//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __ELASTOS_TIMER_H__
#define __ELASTOS_TIMER_H__

#include "6410addr.h"

#define ARMCLK 533000000
#define HCLK   133000000
#define PCLK   66500000

enum {
    PIT_ClockRate               = 8312500,                      // unit: HZ
    PIT_ClockCycle              = (1000000000 / PIT_ClockRate), // unit: NS
};

enum {
    PIT_Irq                     = 23,
};


INLINE void EndOfPITInterrupt()
{
//    kprintf("@ rTINTCSTAT %x\n", rTINTCSTAT);
    rTINTCSTAT |= (1<<5); //clear timer0 interrupt status
}

#endif // __ELASTOS_TIMER_H__
